@using BlazorApp.Pages.Common.Html.HTable
@using BlazorApp.Pages.Common.Metadata
@using BlazorApp.Pages.Event
@inherits BlazorApp.Pages.Common.DrawerPageBase<k8s.Models.V1StorageClass>
@if (StorageClass != null)
{
    <StorageClassAction Item="StorageClass" MenuMode="MenuMode.Horizontal"></StorageClassAction>
    <Divider Orientation="left" Style="font-weight:bold">@L["Metadata"]</Divider>
    <MetadataView Item="StorageClass.Metadata" ExplainFieldPrefix="storageClass"></MetadataView>
    <Divider Orientation="left" Style="font-weight:bold">@L["Spec"]</Divider>
    <HTable Bordered Column="1">
        <PropertySimpleView Title=@L["Provisioner"] Item="@StorageClass.Provisioner"
                            ExplainField="storageClass.provisioner">
        </PropertySimpleView>
        <PropertyMapView Title=@L["Parameters"] Items="@StorageClass.Parameters" ExplainField="storageClass.parameters"
                         T="string">
        </PropertyMapView>
        <PropertyListView Title=@L["MountOptions"] Items="@StorageClass.MountOptions"
                          ExplainField="storageClass.mountOptions" T="string">
        </PropertyListView>
        <PropertyOptionView Title=@L["ReclaimPolicy"] Item="@StorageClass.ReclaimPolicy"
                            ExplainField="storageClass.reclaimPolicy"
                            Options='@(new[] { "Delete", "Recycle", "Retain" })'>
        </PropertyOptionView>
        <PropertyOptionView Title=@L["VolumeBindingMode"] Item="@StorageClass.VolumeBindingMode"
                            ExplainField="storageClass.volumeBindingMode"
                            Options='@(new[] { "Immediate", "WaitForFirstConsumer" })'>
        </PropertyOptionView>
        <PropertySimpleView Title=@L["AllowVolumeExpansion"] Item="@StorageClass.AllowVolumeExpansion"
                            ExplainField="storageClass.allowVolumeExpansion">
        </PropertySimpleView>
    </HTable>

    <MiniEventListView Uid="@StorageClass.Metadata.Uid"></MiniEventListView>
}
